Skip to content

Add flutter_scene_net and the Multiplayer example - #276

Merged
bdero merged 1 commit into
masterfrom
bdero/dashwire-integration
Jul 28, 2026
Merged

Add flutter_scene_net and the Multiplayer example#276
bdero merged 1 commit into
masterfrom
bdero/dashwire-integration

Conversation

@bdero

@bdero bdero commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Adds flutter_scene_net, the multiplayer integration that binds replicated state to the scene graph, plus a Multiplayer example in the example app.

SceneReplication maps replicas to scene nodes through per-type builders, spawning and despawning nodes as the server dictates. Replicas that extend TransformReplica get a NetworkTransformComponent that interpolates remote poses a fixed delay in the past for smooth motion under jitter. SceneHost runs a room and WebSocket listener inside the app so a game can host from one device with a loopback self-join.

The package depends on the newly published dashwire and dashwire_replication.

flutter_scene_net binds dashwire replication to the scene graph. SceneReplication turns spawned replicas into nodes through per-type builders and detaches them on despawn; TransformReplica poses drive nodes through NetworkTransformComponent, which renders remote state through a short interpolation buffer (lerp/slerp over timestamped samples). SceneHost runs a Room plus a WebSocket listener inside the app on dart:io platforms, the listen-server topology, with an in-process loopback for the hosting player; a web stub keeps the same surface compile-clean in browsers.

The Multiplayer example is a server-authoritative arena. One instance taps Host on this device (the HUD shows the LAN address to join), other instances or web builds enter the address and Join; WASD/arrow input replicates as an owner-authority field, the room integrates movement and pellet pickups, and scores flow back over onChange fields. The shared schema/simulation file is pure Dart so the same code can drive a headless server.

The dashwire packages resolve through workspace-root path overrides until they publish.
@bdero
bdero merged commit 70125a8 into master Jul 28, 2026
8 checks passed
@bdero
bdero deleted the bdero/dashwire-integration branch July 28, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant